In current SIP (Session Initiation Protocol) Internet environment, setting up NAT (Network Address Translator) server is very popular. But the Internet telephones under the NAT server cannot achieve P2P (Peer to Peer) transmission directly for speech packets, an SIP proxy server is needed to assist transmission.
In order to transmit speech packets directly, the Internet telephones have to traverse the NAT server. Related inventions for traversal the NAT server are many, for example, Taiwan Invention Patent I 376133 (related US application is U.S. Ser. No. 12/382,261) provides a plurality of registration before issuing an Invite message during registration session in SIP in order to detect the regular rule of the NAT server for allocating communication port, so that the following speech packets can utilize the regular rule to predict the allocated communication port for P2P transmission directly without passing through the SIP proxy server.
But the above-described traversal method will become invalid when an NAT server with ICMP (Internet Control Message Protocol) is met, it is described as below.
Referring to FIG. 1, in which a schematic diagram for direct speech packets transmission in SIP Internet environment is shown. An Internet telephone 1 and an Internet telephone 2 are under a symmetric NAT 3 and a symmetric NAT 4 respectively. A speech packet comprises four parameters, i.e. source IP address, source communication port number, destination IP address, and destination communication port number. The Internet telephone 1 transmits a speech packet-1 to the Internet telephone 2, the speech packet-1 will become speech packet-1′ when passing through the symmetric NAT 3, and the source IP address VIP1 in the speech packet-1 will be converted into RIP1, the source communication port number SP1 will be converted into SP1′, while the destination IP address RIP2 and the destination communication port number DP1 remain unchanged. Similarly, The Internet telephone 2 transmits a speech packet-2 to the Internet telephone 1, the speech packet-2 will become speech packet-2′ when passing through the symmetric NAT 4, and the source IP address VIP2 in the speech packet-2 will be converted into RIP2, the source communication port number SP2 will be converted into SP2′, while the destination IP address RIP1 and the destination communication port number DP2 remain unchanged.
The speech packet-1′ and the speech packet-2′can be sent to the opposite side smoothly only when SP1′=DP2 and DP1=SP2′. SP1′ is designated by the symmetric NAT 3, SP2′ is designated by the symmetric NAT 4, and the designation of the communication port is under a regular rule. The Taiwan Invention Patent I 376133 (related US application is U.S. Ser. No. 12/382,261) is to provide a plurality of registration before issuing an Invite message during registration session in SIP in order to detect the regular rule of the NAT server for allocating communication port, so that the following speech packets can utilize the regular rule to predict the allocated communication port for P2P transmission directly without passing through the SIP proxy server. But even though both sides can conduct P2P transmission directly, synchronous transmissions cannot be guaranteed.
If the symmetric NAT 3 and the symmetric NAT 4 are ICMP (Internet Control Message Protocol) sensitive NATs (i.e. preventive for hackers and viruses), when both sides cannot conduct P2P transmission synchronously, then port locking will be formed. Referring to FIG. 2, the speech packet-1 from the Internet telephone 1 is converted into the speech packet-1′ through the symmetric NAT 3 and sent to the symmetric NAT 4, at this time if the communication port of the symmetric NAT 4 is not open, the symmetric NAT 4 will generate a preventive action and return an ICMP rejection packet to the symmetric NAT3, therefore the symmetric NAT3 will lock the communication port itself (as shown by {circle around (×)}), thereafter the Internet telephone 2 sends a speech packet-2 to be converted into the speech packet-2′ through the symmetric NAT4 for sending to the symmetric NAT 3, the speech packet-2′ will be blocked by the symmetric NAT 3. This is so-called “outbound”.
Another situation is shown in FIG. 3, the speech packet-1 from the Internet telephone 1 is converted into the speech packet-1′ through the symmetric NAT 3 and sent to the symmetric NAT 4, at this time if the communication port of the symmetric NAT 4 is not open, the symmetric NAT 4 will generate a preventive action and return an ICMP rejection packet to the symmetric NAT3, the symmetric NAT4 will lock the communication port itself (as shown by {circle around (×)}), thereafter the Internet telephone 2 sends a speech packet-2 to the symmetric NAT4 for sending to the symmetric NAT 3, but the speech packet-2 will be blocked by the symmetric NAT 4. This is so-called “inbound”.